#!/usr/bin/perl 
use strict;
use warnings;
use TWSE;
use DataSource;
use Data::Dumper;


my $ds = DataSource->new( mkt_types => [ "sii", "otc" ] );	# sii: 上市, otc: 上櫃
my $obj = TWSE->new( verbose => 1, refine => 0 );

# div => 股利分派
# ors => 每月營收
# coi => 公司資訊
# inc => 損益表
# fin => 財務分析
# bal => 資產負債表
# opa => 營益分析
$ds->source( source => "ors", season => 01, year => 99, month => 1 );
my @info = $obj->get_info( $ds );

foreach my $row ( @info ){
    foreach my $col_name ( keys %$row ){
        print $col_name.": ".$row->{$col_name}."\n";
    }
    print "=" x 60 ."\n";
}
